#include "startgame.h"
#include "ui_startgame.h"
#include "mainwindow.h"
#include<QDebug>



startgame::startgame(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::startgame)
{

    ui->setupUi(this);

    this->ppage2 = new MainWindow;
    initial();


}

startgame::~startgame()
{
    delete ui;
}

void startgame::initial(){
    setFixedSize(560,560);
    setWindowTitle("欢迎进入游戏！");
}

void startgame::Paint(QPaintEvent *){

    QPainter painter(this);

    painter.drawPixmap(0,0,520,520,QPixmap(":/bg"));
}
void startgame::on_pushButton_clicked()
{
    this->hide();
    this->ppage2->show();
}

